package com.ykdl.member.views;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.TextView;
/**
 * 
 * 倾斜显示文字的textview
 *
 * @since 1.0
 */
public class RotateTextView extends TextView {


	private float mRotateDegrees = 45.0f;
	public RotateTextView (Context context) {
		super(context);
	}
	public RotateTextView (Context context,AttributeSet paramAttributeSet){
		super(context, paramAttributeSet);
	}
	
	@Override
	protected void onDraw(Canvas canvas) {
		//倾斜度45,上下左右居中
        canvas.rotate(mRotateDegrees, getMeasuredWidth() , getMeasuredHeight());
		super.onDraw(canvas);
	}
}